const { defineConfig } = require('@vue/cli-service')
module.exports = defineConfig({
  transpileDependencies: true,
  devServer: {
    headers: { 'Access-Control-Allow-Origin': '*' },
    proxy: {
      // 字符串简写写法
      // '/api': 'http://192.168.1.51:10010',
      '/api': {
        target: process.env.VUE_APP_API_SEVER,
        changeOrigin: true,
        pathRewrite: {
          '^/api': ''
        }
      },
    },
  }
})
